<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 计算40-100之间的累加和，并且打印输出到页面中
        function sumCount(num1, num2) {
            let sum = 0
            for (let i = num1; i <= num2; i++) {
                sum += num1
            }
            console.log(sum)
            return sum
        }
        let re = sumCount(40, 100)
        console.log(re)

    </script>
</body>

</html>